<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="student/common :: commonhead">
    <!--<div th:replace="student/common :: commonhead"></div>-->
</head>
<head>
    <title>查看作业</title>
    <!--这里写这个页面单独需要的css-->
</head>
<body class="sticky-header">

<section>
    <!--  引入左侧边  -->
    <div th:replace="student/common :: left"></div>

    <div class="main-content">
        <div th:replace="student/common :: header-section"></div>
        <!--这里开始写东西-->
        <div class="wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <section class="panel">
                        <header class="panel-heading">
                            作业要求
                            <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                                <a class="fa fa-times" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <div class="form">
                                <form action="#" class="form-horizontal">
                                    <div class="form-group">
                                        <div class="col-sm-12">
                                            <textarea class="form-control" disabled name="editor1" rows="6" th:text="${homework.homework.hwQuestion}"></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </section>
                </div>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <section class="panel">
                        <header class="panel-heading">
                            我的答案
                            <span class="tools pull-right">
                            <a class="fa fa-chevron-down" href="javascript:;"></a>
                            <a class="fa fa-times" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <div class="form-horizontal ">
                                <div class="form-group">
                                    <div class="col-md-12">
                                        <textarea class="wysihtml5 form-control" rows="9" disabled th:text="${homework.hwsAnswer}" ></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-12">
                                        <form th:action="@{/student/downloadExtra}" method="post">
                                            <input type="text" disabled name="fileName"
                                                   th:if="${not #strings.isEmpty(fileName)}"
                                                   th:value="${#strings.substring(fileName, 20, fileName.length())}">
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <section class="panel">
                        <header class="panel-heading">
                            教师评价
                            <span class="tools pull-right">
                            <a class="fa fa-chevron-down" href="javascript:;"></a>
                            <a class="fa fa-times" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                            <form th:action="@{/student/checkHomework}" class="form-horizontal " method="post">
                                <input type="hidden" name="_method" value="put">
                                <input type="hidden" th:value="${homework.hwId}" name="hwId">
                                <input type="hidden" th:value="${homework.stuId}" name="stuId">
                                <input type="hidden" th:value="${homework.hwsFileName}" name="hwsFileName">
                                <input type="hidden" th:value="${homework.hwsAnswer}" name="hwsAnswer">
                                <input type="hidden" value="1" name="hwsState">
                                <div class="form-group">
                                    <div class="col-md-12">
                                        <textarea class="wysihtml5 form-control" disabled rows="9" name="hwsComment" th:text="${homework.hwsComment}"></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-12">
                                        <label for="extra">分数： </label>
                                        <input type="text" id="extra" name="hwsMark" disabled th:value="${homework.hwsMark}">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </section>
                </div>
            </div>

        </div>

    </div>
</section>

<div th:replace="student/common :: commonjs"></div>
<script type="text/javascript" src="js/ckeditor/ckeditor.js" th:src="@{/js/ckeditor/ckeditor.js}"></script>
</body>
</html>